-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SharkInference-SharkRuntime] Adds capability to mmap vmfbs #1540
Conversation
5ed2c77
to
189afec
Compare
So, Also, on Windows I see an API related issue in
|
This has landed again. iree-org/iree#14153 |
shark/iree_utils/compile_utils.py
Outdated
mmaped_vmfb = ireert.VmModule.mmap(instance, flatbuffer_blob_or_path) | ||
context = ireert.VmContext(instance, modules=[hal_module, mmaped_vmfb]) | ||
else: | ||
tmpf = tempfile.NamedTemporaryFile(delete=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be automatic now.
Lets land this tomorrow so we can have mmap support |
Oh! I missed this - sure, I'll take a look at the upstream changes - accordingly make changes to this PR, test and mark this ready for review. |
189afec
to
204b000
Compare
So, I'm trying to see how to unlink the mapped file. Worst case - I'll keep the mmap loading confined only to those cases where we indeed have the vmfb generated and saved. Therefore getting rid of the temporary file's need. Have made changes to Will update here on my progress. |
204b000
to
13a7a1e
Compare
I've verified the loading on CUDA initially. On Windows I tested with my script - the script would take care of compiling a basic Module and explore the different paths Shark's compilation can take (even switching mmap ON/OFF). After a while I switched over to CUDA and tried re-installing
Even the iree-compiler's version is quite old I speculate that's why CI is failing as well. @monorimet |
Your in python 3.10. using 3.11 will fix it |
-- This commit is based on [VmModule.mmap() API](iree-org/iree#14124). -- It thereby adds capability to mmap vmfbs in SHARK. Signed-off-by: Abhishek Varma <[email protected]>
13a7a1e
to
99d612d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for this.
-- This commit is based on VmModule.mmap() API.
-- It thereby adds capability to mmap vmfbs in SHARK.
Signed-off-by: Abhishek Varma [email protected]